/*
电脑配置
*/
import React from 'react';
import { Row, Col } from 'antd';
import styles from '../../index.less';
import Card from '../../../components/Card';

const Equipment = ({ data }) => (
    <div>
        {data?.map(item => (
            <Card
                type="inner"
                title={item.choiceType === 0 ? '新员工自选' : '部门推荐'}
                style={{ marginBottom: '20px' }}
                key={item.id}
            >
                <Row>
                    <Col span={12}>
                        <ul className={styles.materialList}>
                            <li>
                                <span>电脑类型：</span>
                                <span>{item.computerType === 0 ? '笔记本电脑' : '台式整机'}</span>
                            </li>
                            <li>
                                <span>需要显示器：</span>
                                <span>{item.needDisplay === 1 ? '是' : '否'}</span>
                            </li>
                        </ul>
                    </Col>
                    <Col span={12}>
                        <ul className={styles.materialList}>
                            <li>
                                <span>系统类型：</span>
                                {item.systemType === 0 && <span>windows</span>}
                                {item.systemType === 1 && <span>Mac os</span>}
                                {item.systemType === 2 && <span>Linux</span>}
                            </li>
                            <li>
                                <span>需要鼠标：</span>
                                <span>{item.needMouse === 1 ? '是' : '否'}</span>
                            </li>
                        </ul>
                    </Col>
                </Row>
            </Card>
        ))}
    </div>
);

export default Equipment;
